<?php
/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

use Webman\Route;


Route::any('/test', function ($request) {
    return response('test');
});

Route::any('/route-test', 'app\controller\Index@index');
Route::any('/queue', 'app\controller\Test@queue');

/* blog */
Route::any('/', 'app\controller\Blog@index');
Route::get('/blog/index', 'app\controller\Blog@index'); // 首页
Route::get('/blog/archives', 'app\controller\Blog@archives'); // 归档
Route::get('/blog/links', 'app\controller\Blog@links'); // 链接
Route::get('/blog/details/{id:\d+}', 'app\controller\Blog@details'); // 详情页

/* admin */
Route::post('/api/admin/index', 'app\admin\controller\Login@index');
Route::post('/api/admin/login', 'app\admin\controller\Login@login');
Route::get('/api/admin/info', 'app\admin\controller\Login@info');
Route::post('/api/admin/logout', 'app\admin\controller\Login@logout');

/* 企业微信 */
Route::get('/Qywx/push_message[/{touser}/{toparty}/{message}]', 'app\controller\Qywx@push_message'); // 推送